import request from '@/utils/request'

// 查询用户订单列表
export function listOrderInfo(query) {
  return request({
    url: '/custom/orderInfo/list',
    method: 'get',
    params: query
  })
}

// 查询用户订单详细
export function getOrderInfo(orderInfoId) {
  return request({
    url: '/custom/orderInfo/' + orderInfoId,
    method: 'get'
  })
}

// 查询用户订单统计
export function getInfoCount() {
  return request({
    url: '/custom/orderInfo/getInfoCount',
    method: 'get'
  })
}

// 新增用户订单
export function addOrderInfo(data) {
  return request({
    url: '/custom/orderInfo',
    method: 'post',
    data: data
  })
}

// 修改用户订单
export function updateOrderInfo(data) {
  return request({
    url: '/custom/orderInfo',
    method: 'put',
    data: data
  })
}

// 删除用户订单
export function delOrderInfo(orderInfoId) {
  return request({
    url: '/custom/orderInfo/' + orderInfoId,
    method: 'delete'
  })
}

// 导出用户订单
export function exportOrderInfo(query) {
  return request({
    url: '/custom/orderInfo/export',
    method: 'get',
    params: query
  })
}

// 查询设备充电记录
export function orderList(query) {
  return request({
    url: '/custom/orderInfo/orderList',
    method: 'get',
    params: query
  })
}

// 查询订单价格详情
export function orderInfoDetailsList(query) {
  return request({
    url: '/custom/orderInfo/getOrderInfoDetailsList',
    method: 'get',
    params: query
  })
}

